<?php
function __autoload($class_name) {
	## Split camel-case classname
	$atoms = preg_split('/(?<=\\w)(?=[A-Z])/', $class_name);
	$file = strtolower(array_shift($atoms));
	$path = LIBS . strtolower(implode(DS, array_reverse($atoms)));
	
	if (file_exists($path . DS . $file . '.php')) {
		## Include class file
		include_once $path . DS . $file . '.php';
	}
}
